<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        用户名:&nbsp;&nbsp;&nbsp;<input type="text" v-model="user" value="请输入用户名"/><br/><br/>
        密码:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="password" v-model="password"/><br/><br/>
        性别:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1" v-model="sex">
                <label class="form-check-label" for="inlineRadio1">男</label>
              </div>
              <div class="form-check form-check-inline">
                 <input class="form-check-input" type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2" v-model="sex">
                 <label class="form-check-label" for="inlineRadio2">女</label>
             </div><br/><br/>
        邮件地址:&nbsp;<input type="text" v-model="email"/><br/><br/>
        密码问题:
          <select class="select" v-model="question">
            <option selected>我最喜欢的颜色？</option>
            <option value="1">我的生日？</option>
            <option value="2">我的宠物的名字？</option>
            <option value="3">我的名字？</option>
          </select><br/><br/>
        密码答案:
          <input type="text" v-model="answer"/><br/><br/>
          <button type="button" class="btn btn-info" @click="getIn()">注册</button>
          &nbsp;&nbsp;&nbsp;
          <button type="button" class="btn btn-info" @click="remove()">重填</button>
    </div>
    <script>
        const vm=new Vue({
            el:'#app',
            data:{
                user:'',
                password:'',
                sex:'',
                email:'',
                question:'',
                answer:''
            },
            methods: {
                getIn(){
                    alert("注册成功！");
                },
                remove(){
                    this.user="";
                    this.password="";
                    this.sex='';
                    this.email='';
                    this.question='';
                    this.answer='';
                }
            }
        })
    </script>
</body>
<style>
    #app{
        width: 350px;
        border-style: solid;
        border-width: 2px;
        margin-left: 450px;
        margin-top: 150px;
        padding-left: 40px;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .select{
        width: 185.5px;
        height: 30px;
    }
</style>
</html>